﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Common
{
    public interface IUnit
    {
        /// <summary>
        /// Gets the name for this unit
        /// </summary>
        /// <returns>the name for this unit</returns>
        String getName();
        /// <summary>
        /// Determines if this unit is a filler unit
        /// </summary>
        /// <returns></returns>
        Boolean isFiller();
        /// <summary>
        /// Determines if this unit is the silence unit
        /// </summary>
        /// <returns></returns>
        Boolean isSilence();
        /// <summary>
        /// Gets the  base unit id associated with this HMM
        /// </summary>
        /// <returns></returns>
        int getBaseID();

        /// <summary>
        /// Gets the  base unit associated with this HMM
        /// </summary>
        /// <returns></returns>
        IUnit getBaseUnit();

        /// <summary>
        /// Returns the context for this unit
        /// </summary>
        /// <returns></returns>
        IContext getContext();
        /// <summary>
        /// Determines if this unit is context dependent
        /// </summary>
        /// <returns></returns>
        Boolean isContextDependent();
        /// <summary>
        /// gets the key for this unit
        /// </summary>
        /// <returns></returns>
        String getKey();

        /// <summary>
        /// Checks to see if the given unit with associated contexts is a partial match for this unit.   Zero, One or both
        /// contexts can be null. A null context matches any context
        /// </summary>
        /// <param name="name">the name of the unit</param>
        /// <param name="context">the  context to match against</param>
        /// <returns>true if this unit matches the name and non-null context</returns>
        Boolean isPartialMatch(String name, IContext context);
    }
}
